<div id="main_container">

    {$oZoneHeader}
       
    <div class="main_content">
        {$oZoneTopMenu}
        <div class="center_content">  
            <div class="left_content"> 
                {$oZoneLeftMenu}
                <h4>Les parutions : </h4> 
                    
                <table style="width:240px" id="rounded-corner" summary="2007 Major IT Companies' Profit">
                        {foreach $parutionNumero as $item}
                        <tr >
                            <td >
                               <a href="{jurl 'parution~BoParution:index', array('id'=>$item->parution_id)}">Auto occasion n°{$item->parution_num}</a>
                               <a href="{jurl 'parution~BoParution:supprimer', array('id'=>$item->parution_id)}" class="ask" style="float:right; "><img src="{$j_basepath}design/back/img/user_logout.png" alt=""></a>

                            </td>
                        </tr>
                        {/foreach}
                </table>
            </div>
    
            <div class="right_content">
                {if $parutionDetail->parution_id}
                    <h2>Editer une parution</h2> 
                    {assign $disabled = "DISABLED"}
                {else}
                    <h2>Ajouter une parution</h2> 
                    {assign $disabled = ""}

                {/if} 
                    
                <form action="{jurl 'parution~BoParution:sauvegarder'}" method="post" id="editTemoignage" name="editTemoignage" >
                    <input type="hidden" name="id" value="{$parutionDetail->parution_id}" />
                      <dl>
                        <dt><label>Numéro : </label></dt>
                        <dd><input type="text"  value="{$parutionDetail->parution_num}" name="parution_num" validation="required"/></dd>
                     </dl>

                     <dl>
                        <dt><label>Date de parution : </label></dt>
                        <dd><input type="text"  value="{$parutionDetail->parution_date|jdatetime:'db_date':'lang_date'}" name="parution_date"  id="datepicker1" validation="required"/></dd>
                     </dl>

                     <dl>
                        <dt><label>Date bouclage réelle : </label></dt>
                        <dd><input type="text"  value="{$parutionDetail->parution_bouclage|jdatetime:'db_date':'lang_date'}" name="parution_bouclage" id="datepicker2" validation="required"/></dd>
                     </dl>

                     <dl>
                        <dt><label>Date limite officielle : </label></dt>
                        <dd><input type="text"  value="{$parutionDetail->parution_limite|jdatetime:'db_date':'lang_date'}" name="parution_limite"  id="datepicker3" validation="required" /></dd>
                     </dl>

                     <dl>
                        <dt><label>Date de relance : </label></dt>
                        <dd><input type="text"  value="{$parutionDetail->parution_relance|jdatetime:'db_date':'lang_date'}" name="parution_relance"  id="datepicker4" validation="required"/></dd>
                     </dl>

                     <dl>
                        <dt><label>Date de suppression : </label></dt>
                        <dd><input type="text"  value="{$parutionDetail->parution_suppr|jdatetime:'db_date':'lang_date'}" name="parution_suppression" id="datepicker5" validation="required" /></dd>
                     </dl>


                    <dl class="submit">
                        <input  id ="valider-annonce" class="valider" title="Valider" type="submit" value="" style="margin-right:10px;"/>
                        <a title="Annuler" href="{jurl 'parution~BoParution:index'}" class="bt_green"><span class="bt_green_lft"></span><strong>Annuler</strong><span class="bt_green_r"></span></a>

                    </dl>
                 </form>

            </div><!-- end of right content-->
        </div>   <!--end of center content -->               

        <div class="clear"></div>
    </div> <!--end of main content-->
    
    
    <div class="footer">
    </div>

</div>

 {literal} 
                 <script type="text/javascript">
                $(function(){
                    $( "#datepicker1" ).datepicker({dateFormat: 'dd/mm/yy'});
                    $( "#datepicker2" ).datepicker({dateFormat: 'dd/mm/yy'});
                    $( "#datepicker3" ).datepicker({dateFormat: 'dd/mm/yy'});
					$( "#datepicker4" ).datepicker({dateFormat: 'dd/mm/yy'});
                    $( "#datepicker5" ).datepicker({dateFormat: 'dd/mm/yy'});

                // form validation
                var test = $("#editTemoignage");
                test.validation();
                test.submit(function(e) {
                    $("#valid-form").remove();
                    if(test.validate()) {
                        document.forms["editTemoignage"].submit();
                    }
                    e.preventDefault();
                });

              });
          </script>

  {/literal}